
  <div id="content-wrap">
    <div id="sidebar">
      <h1>Buscar sitio</h1>
      <div class="searchform">
        <p>
          <input name="search_query" class="textbox" type="text" id="buscar_sitio"/>
          <input name="search" class="button" value="Search" type="submit" />
        </p>
        <script type="text/javascript">
			$( "#buscar_sitio" ).autocomplete({
				source: "<?php echo base_url()?>places/search",
				minLength: 1,
				select: function( event, ui ) {
					window.location = '<?php echo base_url()?>places/details/'+ui.item.id;
				}
			});
        </script>
      </div>
      <h1>Mejores calificados</h1>
      <ul class="sidemenu">      	
	      <?php 
	      foreach ($menu['mejores'] as $m)
	        echo '<li>'.anchor('places/details/'.$m->id_sitio,$m->nombre).'</li>';
	      ?>
      </ul>
      <h1>Ultimos sitios agregados</h1>
      <ul class="sidemenu">
          <?php 
	      foreach ($menu['ultimos'] as $m)
	        echo '<li>'.anchor('places/details/'.$m->id,$m->nombre).'</li>';
	      ?>
      </ul>
      <?php 
      	if(isset($menu['notas'])){
      		echo '<h1>Notas en el mapa</h1>';
      		echo '<ul class="sidemenu">';
      		foreach ($menu['notas'] as $nota) {
      			echo '<li><a id="nota'.$nota->id.'">'.substr($nota->comentario,0,20).'...</a></li>';
      		}
      		echo '</ul>';
      	}
      ?>
     
    </div>
     <div id="main">
     	<?php $this->load->view($main_content); ?>
     </div>
     </div>